﻿using System.Collections.Generic;

namespace NiYo.ParserBuilder.Domain
{
    public class Feedback : List<string>
    {
        public bool HasFeedback { get; private set; }

        public new void Add(string feedback)
        {
            HasFeedback = true;
            base.Add(feedback);
        }

        public new bool Remove(string feedback)
        {
            var returnValue = base.Remove(feedback);
            HasFeedback = Count > 0;
            return returnValue;
        }

        public override string ToString()
        {
            return string.Join("\r\n", this);
        }
    }
}
